title = "搜索结果页模板"
url = "/search/:keyword/"
layout = "default"
==
{% set products = catalog.search(this.param.keyword) %}
{% put page_title %}Search result: {{ this.param.keyword }} - {% default %}{% endput %}
{% put pageurl %}{{ 'catalog/search'|page({keyword: this.param.keyword}) }}{% endput %}
{% put meta_keywords %}{{ this.param.keyword }},{{ category.meta_keywords }}{% endput %}
{% put meta_description %}Search result: {{ this.param.keyword }}. {{ category.meta_description }}{% endput %}


{% set per = get('per', 20) %}
{% set currentPage = get('page', 1) %}
<!-- testgit -->

<div id="contents">
    {% partial 'header-campaign-message' %}
    {% partial 'breadcrumbs' pages={(this.param.keyword): '' } %}
    <section>
        <div class="searchpageConditionArea simple_list_item_top clearfix">
            <div class="fl">
                <p class="fnt_small mv10 lh120">{{ 'total'|_ }}：{{ products.total }}{{ 'Item'|_ }}</p>
            </div>
        </div>
        <ul id="productsContent1" class="list_product_box clearfix mt5 twoColumn">
            {% for pro in products.data %}
            <li class="list_product_item">
                <div class="box_list list_product_item_inner">
                    <a class="list_product_link box_list_main" href="{{ pro.url }}?rel=mlist">
                        <div class="list_product_frame">
                            <div class="list_product_img_block">
                                <img class="productImgH" src="{{ pro.f_thumb }}">
                            </div>
                            {% if pro.discount %}
                                <div class="sale-label">{{ pro.discount }} OFF</div>
                            {% endif %}
                            <div class="list_product_text_block mb5">
                                <p class="list_product_brand rdstr">{{ pro.name }}</p>
                                <p class="list_product_brand rdstr">
                                    <b class="list_product_price force_color">{{ pro.price|formatPrice }}</b>
                                    {% if pro.list_price > 0 %}
                                    <span class="old-price">{{ pro.list_price|formatPrice }}</span>
                                    {% endif %}
                                </p>
                                <p class="list_product_brand rdstr">
                                    <span class="reviewStar size1 star{{ pro.rating | round }}" style="position:relative;top:2px;"></span>
                                    {% if pro.reviews.count > 0 %}
                                    <span class="txtPoint">({{ pro.reviews.count }} {{ 'reviews'|_ }})</span>
                                    {% endif %}
                                </p>
                            </div>
                            <span class="arrow"></span>
                        </div>
                    </a>
                </div>
            </li>
            {% endfor %}
        </ul>
        <form id="ajaxLoadFormoreproducts">
            <input id="ajaxLoadFormoreproducts_page" type="hidden" name="page" value="2" />
            <input id="ajaxLoadFormoreproducts_sort" type="hidden" name="sort" value="asc" />
            <input id="ajaxLoadFormoreproducts_keyword" type="hidden" name="keyword" value="{{ this.param.keyword }}" />
        </form>
        <div class="load_click load_click_c" id="view_more_preorder">
            <div id="wait_for_load_list_preorder" style="margin:10px 0;text-align:center;">
                <span id="wait_for_load_list_preorder_text" style="display: none">
                {{ 'Products loading has finished'|_ }}
                </span>
                <span id="wait_for_load_list_preorder_img" style="display: none">
                <img  src="{{ 'assets/images/loadingAnimation.gif'|theme }}" style="width:26px;height:26px;">
                </span>
            </div>
        </div>
        <button id="ajaxLoadFormoreproductsbutton" style="position:relative;width:95%;margin:10px auto;z-index:99;outline:none;font-size:14px;height:35px;">{{ 'See more'|_ }}</button>
        <nav class="corePager">
            <div class="corePager_btn"></div>
            <div class="corePager_info">{{ 'Total '|_ }}{{ products.total }}{{ 'items'|_ }}</div>
            <div class="corePager_btn"></div>
        </nav>
        {% partial 'search_block' %}

    </section>
</div>
<link href="{{ 'assets/css/index.css'|theme }}" rel="stylesheet" type="text/css" />
<link href="{{ 'assets/css/shop.css'|theme }}" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{{ 'assets/js/shop_product.js'|theme }}"></script>
<script type="text/javascript">
    $(function () {
        $("ul.select_common li").click(function(){
            $("#categorySort").toggle();
        });
    });
</script>